FROM python:3.10-slim

USER root

# get packages
COPY requirements.txt .
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

# Copy src
WORKDIR /dashboardproxy

COPY . .

# set listen port
ENV PORT "6789"
EXPOSE 6789

ENTRYPOINT ["python", "-m", "src.server"]